36d4585f87d7c34151a29c29ffc16a17c0c4df18,src/uk/tim740/skUtilities/files/EffZipFiles.java,EffZipFiles,execute,#Event#,28

Before Change



    @Override
    protected void execute(Event e) {
        File Fzip = new File(skUtilities.getDefaultPath(zip.getSingle(e)));
        ArrayList<File> cl = new ArrayList<>();
        for (String Spth : files.getAll(e)) {
            cl.add(new File(skUtilities.getDefaultPath(Spth)));
        }
        File[] Fpths = new File[cl.size()];
        File[] s = cl.toArray(Fpths);
        EvtFileZip efz = new EvtFileZip(Fzip, "Files");
        Bukkit.getServer().getPluginManager().callEvent(efz);
        if (!efz.isCancelled()) {
            try {
                FileOutputStream fout = new FileOutputStream(Fzip);
                ZipOutputStream zout = new ZipOutputStream(new BufferedOutputStream(fout));
                for (File va : s) {
                    FileInputStream fin = new FileInputStream(va);
                    zout.putNextEntry(new ZipEntry(va.getName()));
                    int il;
                    while ((il = fin.read(new byte[1024], 0, 1024)) > 0) {
                        zout.write(new byte[1024], 0, il);
                    }
                    zout.closeEntry();
                    fin.close();
                }
                zout.close();
            } catch (ZipException x) {
                skUtilities.prSysE("ZipFile: '" + Fzip + "' doesn't exist!", getClass().getSimpleName(), x);
            } catch (FileNotFoundException x) {
                skUtilities.prSysE("Files: '" + Arrays.toString(s) + "' 1 or " + s.length + " Files don't exist!", getClass().getSimpleName(), x);
            } catch (IOException x) {
                skUtilities.prSysE(x.getMessage(), getClass().getSimpleName(), x);
            }
        }
    }

After Change



    @Override
    protected void execute(Event e) {
        Path Fzip = Paths.get(skUtilities.getDefaultPath(zip.getSingle(e)));
        ArrayList<File> cl = new ArrayList<>();
        for (String Spth : files.getAll(e)) {
            cl.add(new File(skUtilities.getDefaultPath(Spth)));